home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / G / Get⁄Set.cpt / Get_SetNameLock 1.0 / Get_SetNameLock 1.0 / card_2252.txt < prev    next >
Encoding:
Text File  |  1992-02-11  |  3.4 KB  |  114 lines

  1. -- card: 2252 from stack: in.0
  2. -- bmap block id: 5085
  3. -- flags: 0000
  4. -- background id: 2310
  5. -- name: 
  6.  
  7.  
  8. -- part 9 (field)
  9. -- low flags: 05
  10. -- high flags: 0007
  11. -- rect: left=1 top=86 right=309 bottom=511
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 4
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part 17 (button)
  23. -- low flags: 00
  24. -- high flags: A002
  25. -- rect: left=4 top=54 right=76 bottom=104
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: GetNameLock
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   answer file "Choose a file to examine:"
  37.   put it into appname
  38.   if appname = "" then exit to hypercard
  39.   get GetNameLock(appname)
  40.   if the number of chars of it ‚â§ 5 then
  41.     answer "The NameLock flag of ‚Äú" & appname & "‚Äù is" && it & "."
  42.   else
  43.     answer it with "Sorry"
  44.   end if
  45. end mouseUp
  46.  
  47.  
  48.  
  49. -- part 18 (button)
  50. -- low flags: 00
  51. -- high flags: A002
  52. -- rect: left=108 top=54 right=76 bottom=208
  53. -- title width / last selected line: 0
  54. -- icon id / first selected line: 0 / 0
  55. -- text alignment: 1
  56. -- font id: 0
  57. -- text size: 12
  58. -- style flags: 0
  59. -- line height: 16
  60. -- part name: SetNameLock
  61. ----- HyperTalk script -----
  62. on mouseUp
  63.   answer file "Choose a file to work with:"
  64.   put it into appname
  65.   if appname = "" then exit to hypercard
  66.   if getNameLock(appname) then
  67.     answer "Change NameLock flag to what?" with "True" or "False"
  68.   else
  69.     answer "Change NameLock flag to what?" with "False" or "True"
  70.   end if
  71.   setNameLock appname,it
  72.   if the result ‚↠"" then answer the result with "Sorry"
  73. end mouseUp
  74.  
  75.  
  76.  
  77. -- part 19 (button)
  78. -- low flags: 00
  79. -- high flags: 2000
  80. -- rect: left=473 top=51 right=83 bottom=511
  81. -- title width / last selected line: 0
  82. -- icon id / first selected line: 15664 / 15664
  83. -- text alignment: 1
  84. -- font id: 0
  85. -- text size: 12
  86. -- style flags: 0
  87. -- line height: 16
  88. -- part name: Home
  89. ----- HyperTalk script -----
  90. on mouseUp
  91.   visual dissolve to black
  92.   visual dissolve to white
  93.   visual dissolve to black
  94.   visual dissolve
  95.   go home
  96. end mouseUp
  97.  
  98.  
  99.  
  100. -- part contents for card part 9
  101. ----- text -----
  102. GetNameLock takes one parameter, the pathname of the file you want to examine. SetNameLock takes two parameters, the pathname of the file and TRUE or FALSE indicating your choice of setting. Click on and/or examine the scripts of the buttons above to see how it works!
  103.  
  104. The NameLock flag specifies that a file cannot be renamed from the Finder and that the file cannot have customized icons assigned to it by users.
  105.  
  106. A small shareware fee of $5 is requested if you use this external in any ‚Äúin-house‚Äù, shareware or freeware products. The registration fee for development and prototyping of a future commercial product is $10.  The registration fee for unlimited commercial use in a SINGLE ‚Äúfor sale‚Äù product is $15.  The fee for unlimited commercial use with MULTIPLE products is $25.   These are life-time registrations.  You are entitled to all future shareware updates without further cost.
  107.  
  108. If you have questions or comments I can be reached through the following:
  109.  
  110. Jeffrey Donald Iverson                        CompuServe:      76675,1772
  111. 3841 Whispering Way Drive SE #101             AppleLink:       ALL.AMERICAN
  112. Grand Rapids MI  49546                        America Online:  ProX Jeff
  113. (616) 949-0346                                GEnie:           APOSTASY
  114.